

package com.qiyu.mq.core.annotation;

import com.qiyu.mq.core.consumer.DefaultConsumerHook;
import org.apache.rocketmq.common.consumer.ConsumeFromWhere;
import org.apache.rocketmq.common.protocol.heartbeat.MessageModel;
import org.springframework.stereotype.Component;

import java.lang.annotation.*;

/**
 * @author  idea
 * @version V1.0
 * @date 2020/8/10
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Component
public @interface MqConsumer {

    String topic() default "";

    String tag() default "default-tag";

    MessageModel messageModel() default MessageModel.CLUSTERING;

    ConsumeFromWhere consumeFromWhere() default ConsumeFromWhere.CONSUME_FROM_FIRST_OFFSET;

    Class consumeMessageHook() default DefaultConsumerHook.class;

}
